package com.atguigui.leetcode;

/**
 * 1753.移除石子的最大得分
 * Project: leetcode
 * Package: com.atguigui.leetcode
 * Version: 1.0
 * <p>
 * Created by WJX on 2022/12/21 9:11
 */
public class P1753MaximumScoreFromRemovingStones {
    public static void main(String[] args) {
        Solution solution = new P1753MaximumScoreFromRemovingStones().new Solution();
        // TO TEST
    }

    class Solution {
        public int maximumScore(int a, int b, int c) {
            int sum = a + b + c;
            //找出最大数值
            int maxVal = Math.max(Math.max(a, b), c);
            return Math.min(sum - maxVal, sum / 2);
        }
    }
}
